﻿@{
    Layout = "~/Views/_LayoutPage1.cshtml";
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>医生</title>

    <style>
      

    </style>
</head>
<body>
    <div class="loading-mask" id="isloading" style="display:none">
        <div class="loading-wrapper">
            <div class="loading-icon loading">
            </div><div class="loading-msg">加载中...</div>
        </div>
    </div>
    <div class="page" id="root">
        <div data-reactroot="">
            <div class="doctor">
                <div class="cover-header">
                    <div style="height: 30px;">
                    </div><div class="cover-wrapper">
                        <div class="cover-logo-container">
                            <div class="cover-logo">
                                <span style="background-image: url(../../Content/img/doct.png);"></span>
                            </div>
                        </div>
                        <div class="cover-content">
                            <div class="cover-title"><span>@ViewBag.ysxx.name</span></div>
                            <div class="cover-brief "></div><div class="cover-brief ">浙中医大二院</div><div class="star-wrapper">
                                <span class="star-text">暂无评分</span>
                            </div><a class="cover-link" href="/Yygh/DoctDetail?ysdm=@ViewBag.ysxx.doctid" data-spm-id="100.1211.1000.1">医生简介</a>
                        </div>
                    </div>
                </div><div>
                    <div class="panel g-space">
                        <div class="doctor-profile">
                            <div class="be-good-at">
                                <header class="title"><h2>医生擅长</h2></header>
                                <section class="content">
                                    <p class="content-text txt-overflow-two">@ViewBag.ysxx.goodat </p>
                                    <span class="tags-more" style="display: block; height: 12px; margin-top: 12px;"></span>
                                </section>
                            </div>
                        </div>
                    </div><div class="panel g-space">
                        <div class="schedule-item">
                            <div id="showpb" class="panel-title schedule-title active">@ViewBag.ksmc</div>
                            <div id="showpbxx" class="table-rostering schedule-content active">
                                <div class="panel paiban">
                                    <div class="">
                                        <div class="table-wrapper scheduling-scroll">
                                            <table id="yspb" class="table table-fixed">
                                                <tbody>
                                                    <tr>
                                                        <th class="th-head"></th>
                                                        @for (int i = 0; i < ViewBag.rq.Count; i++)
                                                        {
                                                            if (i == 0)
                                                            {
                                                                <th class=""><div>今天</div><div>@ViewBag.rq[i].rq</div><div style="display:none">_@ViewBag.rq[i].ymd</div></th>
                                                            }
                                                            else
                                                            {
                                                                <th class=""><div>@ViewBag.rq[i].ts</div><div>@ViewBag.rq[i].rq</div><div style="display:none">_@ViewBag.rq[i].ymd</div></th>
                                                            }

                                                        }

                                                    </tr>
                                                    <tr>
                                                        <th>上午</th>

                                                        @for (int i = 0; i < ViewBag.rq.Count; i++)
                                                        {
                                                            List<WxYygh.Models.KSPBResult> list = ViewBag.list;

                                                            if (list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").Count() > 0)
                                                            {
                                                                if (list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").ToList()[0].PBZT == "1")
                                                                {
                                                                    <td class="rostering-full" style="background-color:#ff0000">
                                                                        停诊
                                                                    </td>
                                                                }else if (list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").ToList()[0].KGRS == "0")
                                                                {

                                                                    <td class="rostering-full">已满</td>
                                                                }
                                                                else
                                                                {
                                                                    if (i == 0)
                                                                    {
                                                                        <td class="rostering-full">
                                                                            <div>@list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").ToList()[0].GHLB</div>
                                                                            <div class="rostering-money">¥<br /> @list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").ToList()[0].GHF</div>
                                                                        </td>
                                                                    }
                                                                    else if (i == 7)
                                                                    {
                                                                        if (DateTime.Now.Hour < 15)
                                                                        {
                                                                            <td class="rostering-full">
                                                                                <div>@list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").ToList()[0].GHLB</div>
                                                                                <div class="rostering-money">¥<br /> @list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").ToList()[0].GHF</div>
                                                                            </td>
                                                                        }
                                                                        else
                                                                        {
                                                                            <td class="rostering-had">
                                                                                <div>@list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").ToList()[0].GHLB</div>
                                                                                <div class="rostering-money">¥<br /> @list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").ToList()[0].GHF</div>
                                                                                <div style="display:none">_@list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").ToList()[0].PBID</div>
                                                                            </td>

                                                                        }

                                                                    }
                                                                    else
                                                                    {
                                                                        @*if (list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").ToList()[0].PBZT == "1")
                                                                        {
                                                                            <td class="rostering-full" style="background-color:#ff0000">
                                                                                停诊
                                                                            </td>
                                                                        }
                                                                        else
                                                                        {*@
                                                                            <td class="rostering-had">
                                                                                <div>@list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").ToList()[0].GHLB</div>
                                                                                <div class="rostering-money">¥<br /> @list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").ToList()[0].GHF</div>
                                                                                <div style="display:none">_@list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "1").ToList()[0].PBID</div>
                                                                            </td>
                                                                        //}

                                                                    }

                                                                }

                                                            }
                                                            else
                                                            {
                                                                <td></td>
                                                            }

                                                        }

                                                    </tr>
                                                    <tr>
                                                        <th>下午</th>
                                                        @for (int i = 0; i < ViewBag.rq.Count; i++)
                                                        {
                                                            List<WxYygh.Models.KSPBResult> list = ViewBag.list;

                                                            if (list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").Count() > 0)
                                                            {
                                                                if (list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").ToList()[0].PBZT == "1")
                                                                {
                                                                    <td class="rostering-full" style="background-color:#ff0000">
                                                                        停诊
                                                                    </td>
                                                                }
                                                                else if (list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").ToList()[0].KGRS == "0")
                                                                {

                                                                    <td class="rostering-full">已满</td>
                                                                }
                                                                else
                                                                {
                                                                    if (i == 0)
                                                                    {
                                                                        <td class="rostering-full">
                                                                            <div>
                                                                                @list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").ToList()[0].GHLB
                                                                            </div>
                                                                            <div class="rostering-money">¥<br /> @list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").ToList()[0].GHF</div>
                                                                        </td>
                                                                    }
                                                                    else if (i == 7)
                                                                    {
                                                                        if (DateTime.Now.Hour < 15)
                                                                        {
                                                                            <td class="rostering-full">
                                                                                <div>@list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").ToList()[0].GHLB</div>
                                                                                <div class="rostering-money">¥<br /> @list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").ToList()[0].GHF</div>
                                                                            </td>
                                                                        }
                                                                        else
                                                                        {
                                                                            <td class="rostering-had">
                                                                                <div>@list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").ToList()[0].GHLB</div>
                                                                                <div class="rostering-money">¥<br /> @list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").ToList()[0].GHF</div>
                                                                                <div style="display:none">_@list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").ToList()[0].PBID</div>
                                                                            </td>

                                                                        }

                                                                    }

                                                                    else
                                                                    {
                                                                        @*if (list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").ToList()[0].PBZT == "1")
                                                                        {
                                                                            <td class="rostering-full" style="background-color:#ff0000">
                                                                                停诊
                                                                            </td>
                                                                        }
                                                                        else
                                                                        {*@
                                                                            <td class="rostering-had">
                                                                                <div>@list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").ToList()[0].GHLB</div>
                                                                                <div class="rostering-money">¥<br /> @list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").ToList()[0].GHF</div>
                                                                                <div style="display:none">_@list.Where(x => x.GZRQ == ViewBag.rq[i].ymd && x.ZBLB == "2").ToList()[0].PBID</div>
                                                                            </td>
                                                                        //}
                                                                    }

                                                                }

                                                            }
                                                            else
                                                            {
                                                                <td></td>
                                                            }

                                                        }
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div style="height: 10px;"></div>
            </div>
        </div>
    </div>

    <script>
        $(".tags-more").click(function () {
            if ($(this).css("transform") == "none") {
                $(".doctor-profile .be-good-at p").removeClass("txt-overflow-two")
                $(this).css("transform", "rotate(180deg)");
            } else {
                $(this).css("transform", "none");
                $(".doctor-profile .be-good-at p").addClass("txt-overflow-two")
            }  
        })

        $("#showpb").click(function () {
          
            if ($(this).hasClass("active")) {
                $(this).removeClass("active")
                $("#showpbxx").removeClass("active")
            } else {
                $(this).addClass("active")
                $("#showpbxx").addClass("active")
            }
        })

        $("#yspb td").click(function () {
            if ($(this).text().split("_").length > 1) {
                $("#isloading").show();
                window.location.href = "/Yygh/SelHyxx?pbid=" + $(this).text().split("_")[1];
            }
        })
    </script>
</body>
</html>
